package com.wzy.feign;


import com.wzy.product.bean.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(value = "service-product") //feign客户端  自动负载均衡
public interface ProductFeignClient {
    @GetMapping("/product/{id}") //发送get请求
    Product getProductById(@PathVariable("id") Long id); //json转为对象
}
